package 面向对象_特征5;

import 面向对象_特征3.面向对象_3_关键字super_调用父类的元素1;

public abstract class 面向对象_5_抽象类abstract_1实例 {
    int id;
    String name;
    int salary;//工资

    abstract void print();
}

class yuanGon extends 面向对象_5_抽象类abstract_1实例{
    public void setyuanGon(int id,String name,int salary){
        super.id = id;
        super.name = name;
        super.salary = salary;
    }

    @Override
    void print() {
        System.out.println(id);
    }

    public static void main(String[] args) {
        yuanGon dx = new yuanGon();
        dx.setyuanGon(1,"zy",100);
        dx.print();

    }
}

class boss extends 面向对象_5_抽象类abstract_1实例{
    int jianJin;

    public  void  setboos (int id,String name,int salary,int jianJin){
        super.id =id;
        super.name =name;
        super.salary =salary;
        this.jianJin = jianJin;
    }

    @Override
    void print() {
        System.out.println(jianJin);
    }
}
